import {
	http
} from "../config.js";

// 获取商品分类	Get /goods/get/goodsTypeList
export const goodsTypeList = (params) => {
	return http.get("goods/get/goodsTypeList",params, true,false)
}

// 获取商品分类的商品	GET /goods/get/goodsList
export const goodsList = (params) => {
	return http.get("goods/get/goodsList",params, true,false)
}

// 获取商品详情	GET /goods/get/goodsInfo
export const goodsDetail = (params) => {
	return http.get("goods/get/goodsInfo",params, true,false)
}

//商品搜索  POST /front/goods/search
export const goodsSearch = (params) => {
	return http.post("goods/search", params,true,false);
}


//购物车  POST /front/shopping/cart/list
export const getCarList = (params) => {
	return http.post("front/shopping/cart/list", params,true,false);
}

// ���ﳵȫɾ POST /front/shopping/cart/delete/all
export const deleteAllCarList = (params) => {
	return http.post("front/shopping/cart/delete/all", params);
}

// 加入购物车 POST /front/shopping/cart/add/goods
export const addCartGoods = (params) => {
	return http.post("front/shopping/cart/add/goods", params);
}

// ɾ�����ֹ��ﳵ��Ʒ POST /front/shopping/cart/delete
export const deleteCartGoods = (params) => {
	return http.post("front/shopping/cart/delete", params);
}

// ���ﳵ��������POST /front/shopping/cart/increment
export const CartGoodsIncrement = (params) => {
	return http.post("front/shopping/cart/increment", params,true,false);
}

// ���ﳵ��������POST /front/shopping/cart/decrement
export const CartGoodsDecrement = (params) => {
	return http.post("front/shopping/cart/decrement", params,true,false);
}
//获取运费 GET /goods/get/freight
export const getFreight = (params) => {
	return http.get("goods/get/freight", params);
}
//获取购物车运费 POST /goods/get/freightByCart
export const getFreightCart = (params) => {
	return http.post("goods/get/freightByCart", params);
}
